<div class="content">
	<div class="content_header_left">
		<!-- Start Content Header Left -->
		<?php include("ws_includes/1_ws_inc_priviligestring.php"); ?>
		<?php include("ws_includes/2_ws_inc_headerlabel.php"); ?>
		<!-- End Content Header Left -->
	</div>
	<div class="content_header_right">
		<!-- Start Content Header Right -->
		
		<!-- End Content Header Right -->
	</div>
	<div style="clear:both;"></div>
	<div class="content_body">
		<!-- Start Content Body -->
		<?php if($privilegeView == 1) { ?>
		<?php
			$sql = "select a.*, b.username
					from tr_log a 
						left join ms_user b 
							on a.userid = b.userid 
					where 	a.logdate >= DATE_SUB(CURDATE(), INTERVAL 3 MONTH) 
					order by a.logdate desc
					";
			$exe = mysql_query($sql) or die(mysql_error());
			$num = mysql_num_rows($exe);
		
			if($num > 0)
			{
		?>
		<table id="table" border="1" cellpadding="2" cellspacing="0">
		<thead>
			<tr>
				<th filter='false'>#</th>
				<th>Event</th>
				<th>Date / Time</th>
				<th filter-type='ddl'>User</th>
				<th>IP Address</th>
			</tr>
		</thead>
		<?php
				$number_count = $num;
				while($row = mysql_fetch_array($exe))
				{
		?>
			<tr>
				<td style="vertical-align:top;"><?php echo $number_count; ?></td>
				<td style="vertical-align:top; text-align:left; width:500px;"><?php echo $row['logaction']; ?></td>
				<td style="vertical-align:top;"><?php echo date("d-m-Y, H:i:s",strtotime($row['logdate'])); ?></td>
				<td style="vertical-align:top;"><?php echo $row['username']; ?></td>
				<td style="vertical-align:top;"><?php echo $row['logip']; ?></td>
			</tr>
		<?php
					$number_count--;
				}
			}
			else
			{
		?>
				No data !
		<?php
			}
		?>
		</table>
		<?php } ?>
		<!-- End Content Body -->
	</div>
	<div style="clear:both;"></div>
</div>